package sjtu.rfid.rri.services.casp.model;

public enum BizLocationType {
	ReceivingArea, StagingArea, POS, Home, Unkown;

	/**
	 * a convenient static factory to build the BizLocationType from String
	 * name.
	 * 
	 * @param type
	 * @return
	 */
	public static BizLocationType buildFromString(String type) {
		if (ReceivingArea.toString().equals(type)) {
			return ReceivingArea;
		} else if (StagingArea.toString().equals(type)) {
			return StagingArea;
		} else if (POS.toString().equals(type)) {
			return POS;
		} else if (Home.toString().equals(type)) {
			return Home;
		} else {
			return Unkown;
		}
	}
}
